<template>
  <!-- // 0823cje -->
  <div class="form_box">
    <el-row class="nav">
      <i class="el-icon-arrow-left"
         @click="goBack"></i>
      <span class="font-weight rebuild_order">{{$store.state.systemTypeName}}</span>
    </el-row>
    <el-divider></el-divider>
    <div class="form">
      <iframe src='static/dist/index.html'
              frameborder='0'
              scrolling='auto'
              height='100%'
              width='100%'></iframe>
      <!-- <iframe src='../static/dist/index.html' frameborder='0'  scrolling='auto' height='100%' width='100%'></iframe> -->
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      nameWork: '交易项目',
      jsonData: {
        'list': [
          {
            'type': 'input',
            'name': '单行文本',
            'icon': 'icon-input',
            'options': {
              'width': '100%',
              'defaultValue': '',
              'required': false,
              'dataType': 'string',
              'pattern': '',
              'placeholder': '',
              'remoteFunc': 'func_1561002620000_16065'
            },
            'key': '1561002620000_16065',
            'model': 'input_1561002620000_16065',
            'rules': [
              {
                'type': 'string',
                'message': '单行文本格式不正确'
              }
            ]
          }
        ],
        'config': {
          'labelWidth': 100,
          'labelPosition': 'top',
          'size': 'small'
        }
      }
    }
  },
  mounted () {
    // this.send()
  },
  methods: {
    goBack () {
      if (this.$store.state.systemTypeName === '新建自定义字段' || this.$store.state.systemTypeName === '编辑自定义字段') {
        this.$router.push('/customField')
      } else if (this.$store.state.systemTypeName === '新建工单模板' || this.$store.state.systemTypeName === '编辑工单模板' || this.$store.state.systemTypeName === '复制工单模板') {
        this.$router.push('/formWork')
      }
    }
    // send () {
    //   let data = JSON.parse(sessionStorage.getItem('form'))
    //   data.tableData.push({
    //     date: '2016-05-33',
    //     name: this.nameWork,
    //     address: '上海市普陀区金沙江路 1518 弄'
    //   })
    //   sessionStorage.setItem('form', JSON.stringify(data))
    // }
  }
}
</script>
<style scoped>
.form_box {
  width: 100%;
  height: 100%;
}

.form {
  width: 100%;
  height: 90%;
}

.formName {
  width: 400px;
  margin-bottom: 30px;
}

.el-icon-arrow-left {
  font-size: 13px;
  color: #b60028;
  font-weight: 700;
  padding: 0 5px;
  cursor: pointer;
}
</style>
